package com.pactera.madp.cp.api.feign;

import com.pactera.madp.common.core.constant.SecurityConstants;
import com.pactera.madp.common.core.constant.ServiceNameConstants;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestHeader;

@FeignClient(contextId = "remoteAsyncMsgTaskService",value = ServiceNameConstants.CP_SERVICE)
public interface RemoteAsyncMsgTaskService {

    @PostMapping("/job-task/async-msg")
    void onAsyncMsg(@RequestHeader(SecurityConstants.FROM) String from);

    @DeleteMapping("/job-task/clear-msg")
    void clearExpireMsg(@RequestHeader(SecurityConstants.FROM) String from);

}
